package edu.tgc.entity;

import java.util.Date;
import java.util.UUID;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.format.annotation.DateTimeFormat;

import edu.tgc.entity.system.BaseEntity;
import edu.tgc.entity.system.SysUser;

@Entity
public class TbAudit extends BaseEntity {

    private static final long serialVersionUID = -6378830995156841813L;
    private SysUser auditor;// 审核人
    private String content;// 内容
    private Date createTime;// 日期
    private Boolean pass;// 结论

    public TbAudit() {
        super();
        // TODO Auto-generated constructor stub
    }

    public TbAudit(UUID id) {
        super(id);
        // TODO Auto-generated constructor stub
    }

    @CreatedBy
    @ManyToOne
    public SysUser getAuditor() {
        return this.auditor;
    }

    @Column(length = 50)
    public String getContent() {
        return this.content;
    }

    @CreatedDate
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Temporal(TemporalType.DATE)
    public Date getCreateTime() {
        return this.createTime;
    }

    public Boolean getPass() {
        return this.pass;
    }

    public void setAuditor(SysUser auditor) {
        this.auditor = auditor;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public void setPass(Boolean pass) {
        this.pass = pass;
    }

}
